﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BooksOnline.Models.Entities;
using FluentNHibernate.Mapping;

namespace BooksOnline.Models.Mappings
{
    public class BookMapping : ClassMap<Book>
    {
        public BookMapping()
        {
            Table("Book");
            Id(a => a.Id);
            Map(a => a.ISBN);
            Map(a => a.Price);
            Map(a => a.Title);
            References(a => a.Author);
            Component(a => a.CreateTrackingTimestamp);
            Component(a => a.ChangeTrackingTimestamp);
        }
    }
}